﻿<Controls:SinacorWindow	
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"  
    xmlns:Custom="http://schemas.xceed.com/wpf/xaml/datagrid"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:Controls="clr-namespace:Sinacor.Infra.UI.Controls.SmartClient;assembly=Sinacor.Infra.UI.Controls"    
    WindowStartupLocation="CenterScreen" 
    WindowState="Maximized" 
    Title="{DynamicResource Bovespa.ContasCorrente.Label.PesquisaHistCC}"
	x:Class="Sinacor.UI.Bovespa.ContaCorrente.View.SmartClient.PesquisaHistoricoContaCorrente"
    ModulePlus="True"
    ModuleId="BOL">

    <Controls:SinacorExpanderContainer>
        <Grid.RowDefinitions>
            <RowDefinition	Height="65"/>
            <RowDefinition	Height="4"/>
            <RowDefinition	Height="*"
							MinHeight="150"/>
        </Grid.RowDefinitions>

        <Controls:SinacorExpander	Header="{DynamicResource Bovespa.ContasCorrente.Label.ExpanderPesquisa}"
									Grid.Row="0"
									TabIndex="4" IsExpanded="True">
            <Grid>
                <Controls:SinacorLabel	HorizontalAlignment="Left"
									VerticalAlignment="Top"
                                    Margin="0,0,0,0"
									Content="{DynamicResource Bovespa.ContasCorrente.Label.PesquisaDescricao}"
									Width="80"/>

                <Controls:SinacorTextBox	HorizontalAlignment="Left"
										Margin="85,0,0,0" x:Name="txtPesquisaDescricao"
										VerticalAlignment="Top"
										Width="755" 
										TabIndex="1"
                                        Text="{Binding presenter.FiltroHistoricoContaCorrente.Descricao}"
										ToolTip="{DynamicResource Bovespa.ContasCorrente.Tooltip.PesquisaCCPesquisar}"/>

                <Controls:SinacorButton	HorizontalAlignment="Left"
                           			VerticalAlignment="Top"
                           			Content="{DynamicResource Bovespa.ContasCorrente.Label.PesquisaCCPesquisar}"
                           			Width="100"
                           			Margin="845,0,0,0"
									IsDefault="True" Click="SinacorButton_Click" 
									ToolTip="{DynamicResource Bovespa.ContasCorrente.Label.PesquisaCCPesquisar}"
									TabIndex="2"/>

                <Controls:SinacorButton	HorizontalAlignment="Left"
									VerticalAlignment="Top"									
                                    Name="btnNovaPesquisa"    
									Margin="950,0,0,0"
									TabIndex="3"
                                    Click="btnNovaPesquisa_Click"    
									Icon="IconButtonNewSearch"/>
            </Grid>
        </Controls:SinacorExpander>

        <Controls:SinacorExpander	Header="{DynamicResource Bovespa.ContasCorrente.Label.ExpanderHistCC}"
									Grid.Row="2"
									TabIndex="6" IsExpanded="True" AllowExpand="False">
            <Grid>
                <Controls:SinacorDataGrid Name="dtgHistorico" TabIndex="5"
                                          AllowUndo="False" 
                                          AllowUndoAll="False" 
                                          AllowUndoLast="False"   
                                          AllowSave="False"
                                          AllowSaveAll="False"
                                          Margin="0"
                                          HorizontalAlignment="Stretch"
                                          VerticalAlignment="Stretch"
                                          ItemsSource="{Binding Path=presenter.ListaHistoricoContaCorrente, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Controls:SinacorWindow}}}"
                                          SelectedItem="{Binding Path=presenter.HistoricoContaCorrenteSelecionada, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Controls:SinacorWindow}}}" 
                                          AllowBeginUpdate="False" MouseDoubleClick="dtgHistorico_MouseDoubleClick">

                    <Controls:SinacorDataGrid.Columns>

                        <Controls:Column Name="Codigo"
                                         Title="Bovespa.ContasCorrente.Label.PesquisaCodigo"
                                         IsRequired="False"  DisplayMemberPath="Codigo"
                                         AllowInsert="False"
                                         AllowUpdate="False" 
                                         HorizontalCellAlignment="Right"
										 Width="55"/>

                        <Controls:Column Name="Descricao"
                                         Title="Bovespa.ContasCorrente.Label.PesquisaDescricao"
                                         IsRequired="False" DisplayMemberPath="Descricao"
                                         AllowInsert="False"
                                         AllowUpdate="False" 
                                         HorizontalCellAlignment="Left"/>

                        <Controls:Column Name="Tipo"
                                         Title="Bovespa.ContasCorrente.Label.PesquisaTipo"
                                         IsRequired="False" DisplayMemberPath="Tipo"
                                         AllowInsert="False"
                                         AllowUpdate="False" 
                                         HorizontalCellAlignment="Center"
										 Width="40"/>

                        <Controls:Column Name="DiasProjecao"
                                         Title="Bovespa.ContasCorrente.Label.PesquisaDiasProjecao"
                                         IsRequired="False"
                                         AllowInsert="False" DisplayMemberPath="DiasProjecao"
                                         AllowUpdate="False" 
                                         HorizontalCellAlignment="Right"
										 Width="70"/>

                    </Controls:SinacorDataGrid.Columns>
                </Controls:SinacorDataGrid>

            </Grid>
        </Controls:SinacorExpander>
    </Controls:SinacorExpanderContainer>
</Controls:SinacorWindow>